<script type="text/javascript">

    $(function () {
        var order = function (product_id) {
            var $form = $("<form action='{{url_for('over.handlers.my.order.cart')}}' method='post'></form>");
            var $document = $(document);

            var $hidden = $("<input type='hidden' name='product_id' value='" + product_id + "'></input>");
            $form.append($hidden);

            $form.submit();

        }


        $("#order-month").click(function () {
            order(1);
        });

        $("#order-year").click(function () {
            order(2);
        });

    });

</script>
